#pragma once

#include "base_noncopyable.h"
#include "base_timer.h"
#include "media_stream.h"
#include <atomic>
#include <functional>
#include <future>
#include <memory>
#include <mutex>
#include <thread>
#include <vector>

namespace El {
namespace Media {

class CStreamDiagnosis {
    DISALLOW_COPY_AND_MOVE(CStreamDiagnosis);
    CStreamDiagnosis() = default;
    ~CStreamDiagnosis() = default;

public:
    static CStreamDiagnosis &GetInstance();

    bool Start();

private:
    void Record(const std::string &args);
    void OnStream(const MediaFramePtr &ptr);

private:
    int32_t handle_{0};
    StreamSourcePtr stream_{nullptr};
};

} // namespace Media
} // namespace El